package com.xuecheng.manage_media.controller;

import com.xuecheng.api.media.MediaFileControllerApi;
import com.xuecheng.framework.domain.media.request.QueryMediaFileRequest;
import com.xuecheng.framework.model.response.QueryResponseResult;
import com.xuecheng.manage_media.service.MediaFileService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/media/file")
public class MediaFileController implements MediaFileControllerApi {
    @Resource
    private MediaFileService mediaFileService;
    /**
     * 分页查询视频信息
     *
     * @param page                  当前第几页
     * @param size                  每页显示多少
     * @param queryMediaFileRequest 可以携带参数查询
     * @return 返回数据
     */
    @Override
    @GetMapping("/list/{page}/{size}")
    public QueryResponseResult<?> findList(@PathVariable("page") int page, @PathVariable("size") int size, QueryMediaFileRequest queryMediaFileRequest) {
        return mediaFileService.findList(page, size, queryMediaFileRequest);
    }
}
